home *** CD-ROM | disk | FTP | other *** search
- /* Title ToCopy */
- /* Author Paul Clough */
- /* version 1.1 */
- /* date 29/06/98 */
- /* lastdate 26/07/98 */
- /* Email ca5pcl@isis.sunderland.ac.uk */
-
-
- /* Do with result in Opus Directory variable pass to my rexx programme */
- options results
-
- /* Pass PortName of direcotry Opus as argrument */
-
- Parse arg PortName
-
- /* Test see if port is active */
- IF show('P',PortName) then
- Do
- /* tell send line or chars to finnal copy at current cursor location */
- address(PortName)
-
- /* get active window */
- status 3 -1
- win=result
-
-
- /* entries in the directory window */
-
- status 6 win
- entries=result
-
- /* selected entries in the directory window */
- status 9 win
- selentries=result
-
- if selentries=entries then
- Do
- /* returns the name of the directory (Source) */
- status 13 win
- sourpath=result
-
- /* de-highligh marks files */
- None
-
- /* Switch to other window in opus 4.12 */
- OtherWindow
-
- status 3 -1
- win=result
-
- /* returns the name of the directory (destination) */
- status 13 win
- destpath=result
-
- /* Do with wild card and spaces */
- sourpath='"'sourpath'#?"'
- destpath='"'destpath'"'
- say(sourpath'----'destpath)
-
- /* Use Dos command copy to duplicate files free up opus */
- address command
- copy sourpath destpath ALL
-
- /* Rescan destory directory */
- address (PortName)
- Rescan
- End
- else
- Do
- /* Use internal Opus copy command */
- Copy
- End
- End
- else
- Do
- /* Print up a error message */
- say ('Dopus directory not in memory')
- End
-
-
- say(result)
-
-